Next | Prev | Up | Top | Contents | Index

Defining Device Names

The device special files related to Silicon Graphics device drivers are created by execution of the script /dev/MAKEDEV. Additional device special files can be created with administrator commands.


IRIX Conventional Device Names

The device drivers distributed with IRIX depend on certain conventions for device names. These conventions are spelled out in the following reference pages: intro(7), dks(7), dsreq(7), and tps(7). For example, the components of a disk device name in /dev/dsk include

dkscConstant prefix "dks" followed by bus adapter number c.
duConstant letter "d" followed by disk SCSI ID number u.
ln Optionally, letter "l" (ell) and logical unit number n (used only when disk u controls multiple drives).
sp or vh or volConstant letter "s" and partition number p, or else "vh" for volume header, or "vol" for (entire) volume.

Programs throughout the system rely on the conventions for these device names. In addition, by convention the associated major and minor numbers agree with the names. For example, the logical unit and partition numbers that appear in a disk name are also encoded into the minor number.


The Script MAKEDEV

The conventions for all the IRIX device special names are written into the script /dev/MAKEDEV. This is a make file, but unlike most make files, it is not used to compile executable programs. It contains the logic to prepare device special names and their associated major and minor numbers and file permissions.

The MAKEDEV script is executed during IRIX startup from a script in /etc/rc2.d. It is executed after all device drivers have been initialized, so it can use the output of the hinv command to construct device names to suit the actual configuration.

The system administrator can invoke MAKEDEV to construct device special files. Administrator use of MAKEDEV is described in IRIX Administration: System Configuration and Operation.


Making Device Files

You or a system administrator can create device special files explicitly using the commands mknod or install. Either command can be used in a make file such as you might create as part of the installation script for a product.

For details of these commands, see the install(1) and mknod(1M) reference pages, and IRIX Administration: System Configuration and Operation. The following is a hypothetical example of install:

# install -m 644 -u root -g sys -root /dev -chr 62,0

The -chr option specifies a character device, and 62,0 are the major and minor device numbers, respectively.

Tip: The mknod command is portable, being used in most UNIX systems. The install command is unique to IRIX, and has a number of features and uses beyond those of mknod. Examples of both can be found by reading /dev/MAKEDEV.


Multiple Names for One Device

It is possible to point to the same device with more than one device special filename. This is done in the distributed IRIX system for several reasons:


Next | Prev | Up | Top | Contents | Index